﻿using System;
using System.Globalization;
using System.Windows.Data;
using DataTransferObject;

namespace Presentation.Infrastructure
{
    public class ObjetPatrimonialDTOStateConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var state = (ObjetPatrimonialDTOState) value;
            switch (state)
            {
                case ObjetPatrimonialDTOState.FullyOperational:
                    return "Fonctionnement total";
                case ObjetPatrimonialDTOState.PartiallyOperational:
                    return "Fonctionnement partiel";
                case ObjetPatrimonialDTOState.NotOperational:
                    return "Ne fonctionne pas";
            }
            return String.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
